package so.wy.servicecenter.businessbed.service.device;

import lombok.Data;
import lombok.NoArgsConstructor;
import so.wy.servicecenter.businessbed.dao.rdb.device.DeviceDO;
import so.wy.servicecenter.businessbed.service.hospital.dto.HospitalPriceDTO;

/**
* @author wdl
* @date 2020-04-08
*/
@Data
@NoArgsConstructor
public class DeviceDetailsDTO {

	/** 主键ID */
	private Long deviceId;
	/** 设备编号 */
	private String deviceSerial;
	/** 蓝牙mac地址 */
	private String bleMac;
	/** 主板电量 */
	private Double batteryBoard;
	/** 主板电量报警 */
	private Double batteryBoardAlarm;
	/** 锁电量 */
	private Double batteryLock;
	/** 锁电量报警 */
	private Double batteryLockAlarm;
	/** 硬件版本 */
	private String hardVer;
	/** 软件版本 */
	private String softVer;
	/** 设备备注 */
	private String deviceRemark;
	/** 设备图片 */
	private String deviceImgs;
	/** 设备状态 1可租赁 2已租赁 3已故障 */
	private Integer deviceStatus;
	/** 设备投放状态 */
	private Integer devicePublishStatus;
	/** 医院ID */
	private Long hospitalId;
	/** 楼栋ID */
	private Long buildingId;
	/** 楼层ID */
	private Long floorId;
	/** 科室ID */
	private Long departId;
	/** 医院名称 */
	private String hospitalName;
	/** 楼栋名称 */
	private String buildingName;
	/** 楼层名称 */
	private String floorName;
	/** 科室名称 */
	private String departName;
	/** 排序 */
	private Integer sortNum;

	private HospitalPriceDTO priceSetting;

	public DeviceDetailsDTO(DeviceDO deviceDO){
		if(deviceDO==null){
			return ;
		}

		this.deviceId = deviceDO.getDeviceId();
		this.deviceSerial = deviceDO.getDeviceSerial();
		this.bleMac = deviceDO.getBleMac();
		this.batteryBoard = deviceDO.getBatteryBoard();
		this.batteryBoardAlarm = deviceDO.getBatteryBoardAlarm();
		this.batteryLock = deviceDO.getBatteryLock();
		this.batteryLockAlarm = deviceDO.getBatteryLockAlarm();
		this.hardVer = deviceDO.getHardVer();
		this.softVer = deviceDO.getSoftVer();
		this.deviceRemark = deviceDO.getDeviceRemark();
		this.deviceImgs = deviceDO.getDeviceImgs();
		this.deviceStatus = deviceDO.getDeviceStatus();
		this.devicePublishStatus = deviceDO.getDevicePublishStatus();
		this.hospitalId = deviceDO.getHospitalId();
		this.buildingId = deviceDO.getBuildingId();
		this.floorId = deviceDO.getFloorId();
		this.departId = deviceDO.getDepartId();
		this.hospitalName = deviceDO.getHospitalName();
		this.buildingName = deviceDO.getBuildingName();
		this.floorName = deviceDO.getFloorName();
		this.departName = deviceDO.getDepartName();
		this.sortNum = deviceDO.getSortNum();
	}

}
